/*
 * JSF Toolkit Component Framework
 * Copyright (C) 2007 Noah Sloan <iamnoah A-T gmail D0T com>
 * 
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 */
package com.jsftoolkit.gen.info;

/**
 * Interface for classes that provide information about a component.
 * 
 * @author noah
 * 
 */
public interface ComponentInfoProvider {
	/**
	 * Attempts to populate one or more properties of info. info may already
	 * have properties that have been filled in. It is the responsibility of the
	 * implementation to determine (and document!) when to overwrite existing
	 * information. Implementations should attempt to add as much specific
	 * information as possible.
	 * <p>
	 * It is also possible that the info instance is completely blank.
	 * <p>
	 * Implementations are encouraged to throw and
	 * {@link IllegalArgumentException} or {@link IllegalStateException} if due
	 * to a problem with the existing data or if the implementation is unable to
	 * process due to lack of information, etc. The exception message should be
	 * very explicit as to which property(ies) are invalid.
	 * 
	 * @param info
	 *            a possibly already (paritialy) populated {@link ComponentInfo}
	 *            instance.
	 */
	void fillIn(ComponentInfo info);
}
